{% extends 'TopxiaAdminBundle:User:layout.html.twig' %}

{% block title %}登录日志 - {{ parent() }}{% endblock %}

{% set menu = 'login_record' %}
{% set script_controller = 'login-record/list' %}

{% block main %}
<div class="page-header">
  <h1>登录日志</h1>
</div>

<div class="well well-sm">
  <form id="login-record-search-form" class="form-inline" action="" method="get" novalidate> 

      <div class="form-group">
          <input class="form-control" type="text" id="startDate" name="startDateTime" value="{{app.request.query.get('startDateTime')}}" placeholder="起始时间">
      </div>

      <div class="form-group">
          <input class="form-control" type="text" id="endDate" name="endDateTime" value="{{app.request.query.get('endDateTime')}}" placeholder="结束时间">
      </div>
      <span></span>
      <div class="form-group">
        <input type="text" id="nickname" name="nickname" value="{{app.request.query.get('nickname')}}" class="form-control" placeholder="用户名">
      </div>

      <div class="form-group">
        <input type="text" id="email" name="email" value="{{app.request.query.get('email')}}" class="form-control" placeholder="邮箱">
      </div>

      <button class="btn btn-primary">搜索</button>
  </form>
</div>



<table id="teacher-table" class="table table-striped table-hover" data-search-form="#user-search-form">
  <thead>
    <tr>
      <th>用户名</th>
      <th>用户邮箱</th>
      <th>登录时间IP</th>
      <th>登录地点</th>
      <th width="8%">查看记录</th>
    </tr>
  </thead>
  <tbody>
    {% for logRecord in logRecords %}
      {% set user = users[logRecord.userId]|default(null) %}
      {% include 'TopxiaAdminBundle:LoginRecord:table-tr.html.twig' with {logRecord:logRecord} %}
    {% endfor %}
  </tbody>
</table>
 {{ web_macro.paginator(paginator) }} 
{% endblock %}